package com.example.vehicleservice.mapper;

import com.example.vehicleservice.entity.Student;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author cc
 * @since 2022-06-09
 */
public interface StudentMapper extends BaseMapper<Student> {

    @Select("select * from student order by id desc limit 5")
    List<Student> getLastData();

    @Select("delete from student limit 5")
    void removeLastData();
}
